import { Widget } from "./widget";

export enum FlexDirection {
    Row = 0,
    Column = 1,
    RowReverse = 2,
    ColumnReverse = 3
}

export class Panel extends Widget {

    static {
        globalThis.__Panel__ = new Panel();
    }

    get orientation(): FlexDirection {
        return Deno.core.ops.opGetPanelOrientation(this);
    }

    set orientation(mode: FlexDirection) {
        Deno.core.ops.opSetPanelOrientation(this, mode);
    }

    get spacing(): number {
        return Deno.core.ops.opGetPanelSpacing(this);
    }

    set spacing(value: number) {
        Deno.core.ops.opSetPanelSpacing(this, value);
    }
}